﻿<?xml version="1.0"?>
<ModelDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<ClientName>dotNetProfessioanl.com</ClientName>
	<CopyrightNotice>Copywright 2008 $ClientName$</CopyrightNotice>
	<ModelName>ModelingSample</ModelName>
	<RootPath>c:\temp\modeltest\$ModelName$</RootPath>
	<RootNamespace>$ClientName$.$ModelName$</RootNamespace>

	<DomainDefinition>
		<ModelConnectionString>Data Source=.;Initial Catalog=ModelingSample;Integrated Security=true;Connection Timeout=1;</ModelConnectionString>
		<ResolveLooseRelationships>false</ResolveLooseRelationships>
		<DomainNamespace>$Entity.Domain.RootNamespace$.Business.Entities.$Entity.RelativeNamespace$</DomainNamespace>
		<ManyToManyRuleDefinition>
			<ManyToManyRuleDefinition SourceObjectName="ModifiedDate"/>
			<ManyToManyRuleDefinition SourceObjectName="rowguid"/>
		</ManyToManyRuleDefinition>
		<BaseEntityClass>
			<ClassName></ClassName>
			<Namespace></Namespace>
			<Attributes>
			</Attributes>
		</BaseEntityClass>

		<Entities>
			<EntityDefinition Name="Customer" RelativeNamespace="" IsAbstract="false" IsUpdatable="true" EntityType="Entity" SourceObjectName="dbo.Customer" SourceObjectType="Table" Visible="true">
				<Properties>
					<PropertyDefinition Name="CustomerID" SourceObjectName="CustomerID" Visible="true"/>
					<PropertyDefinition Name="CustomerName" SourceObjectName="CustomerName" Visible="true"/>
					<PropertyDefinition Name="ContactName" SourceObjectName="ContactName" Visible="true"/>
				</Properties>
				<BusinessKeys>
					<BusinessKeyDefinition SourceObjectName="CustomerName" />
				</BusinessKeys>
				<Relationships>
					<RelationshipDefinition Name="Orders" RelationshipType="OneToMany" SourceObjectName="FK_Order_Customer" Visible="true"/>
				</Relationships>
			</EntityDefinition>
			<EntityDefinition Name="Order" RelativeNamespace="" IsAbstract="false" IsUpdatable="true" EntityType="Entity" SourceObjectName="dbo.Order" SourceObjectType="Table" Visible="true">
				<Properties>
					<PropertyDefinition Name="OrderID" SourceObjectName="OrderID" Visible="true"/>
					<PropertyDefinition Name="StatusID" SourceObjectName="StatusID" Visible="true"/>
					<PropertyDefinition Name="CustomerID" SourceObjectName="CustomerID" Visible="true"/>
					<PropertyDefinition Name="Total" SourceObjectName="Total" Visible="true"/>
					<PropertyDefinition Name="OrderTypeID" SourceObjectName="OrderTypeID" Visible="true"/>
				</Properties>
				<BusinessKeys>
					<BusinessKeyDefinition SourceObjectName="OrderID" />
				</BusinessKeys>
				<Relationships>
					<RelationshipDefinition Name="Customer" RelationshipType="ManyToOne" SourceObjectName="FK_Order_Customer" Visible="true"/>
					<RelationshipDefinition Name="OrderType" RelationshipType="ManyToOne" SourceObjectName="FK_Order_OrderType" Visible="true"/>
					<RelationshipDefinition Name="Status" RelationshipType="ManyToOne" SourceObjectName="FK_Order_Status" Visible="true"/>
					<RelationshipDefinition Name="OrderDetails" RelationshipType="OneToMany" SourceObjectName="FK_OrderDetail_Order" Visible="true"/>
				</Relationships>
			</EntityDefinition>
			<EntityDefinition Name="OrderDetail" RelativeNamespace="" IsAbstract="false" IsUpdatable="true" EntityType="Entity" SourceObjectName="dbo.OrderDetail" SourceObjectType="Table" Visible="true">
				<Properties>
					<PropertyDefinition Name="OrderDetailID" SourceObjectName="OrderDetailID" Visible="true"/>
					<PropertyDefinition Name="OrderID" SourceObjectName="OrderID" Visible="true"/>
					<PropertyDefinition Name="ProductID" SourceObjectName="ProductID" Visible="true"/>
					<PropertyDefinition Name="Quantity" SourceObjectName="Quantity" Visible="true"/>
					<PropertyDefinition Name="Price" SourceObjectName="Price" Visible="true"/>
					<PropertyDefinition Name="Total" SourceObjectName="Total" Visible="true"/>
				</Properties>
				<BusinessKeys>
					<BusinessKeyDefinition SourceObjectName="OrderDetailID" />
				</BusinessKeys>
				<Relationships>
					<RelationshipDefinition Name="Order" RelationshipType="ManyToOne" SourceObjectName="FK_OrderDetail_Order" Visible="true"/>
					<RelationshipDefinition Name="Product" RelationshipType="ManyToOne" SourceObjectName="FK_OrderDetail_Product" Visible="true"/>
				</Relationships>
			</EntityDefinition>
			<EntityDefinition Name="OrderType" RelativeNamespace="" IsAbstract="false" IsUpdatable="true" EntityType="Reference" SourceObjectName="dbo.OrderType" SourceObjectType="Table" Visible="true">
				<Properties>
					<PropertyDefinition Name="OrderTypeID" SourceObjectName="OrderTypeID" Visible="true"/>
					<PropertyDefinition Name="OrderTypeName" SourceObjectName="OrderTypeName" Visible="true"/>
				</Properties>
				<BusinessKeys>
					<BusinessKeyDefinition SourceObjectName="OrderTypeName" />
				</BusinessKeys>
				<Relationships>
					<RelationshipDefinition Name="Orders" RelationshipType="OneToMany" SourceObjectName="FK_Order_OrderType" Visible="true"/>
				</Relationships>
			</EntityDefinition>
			<EntityDefinition Name="Product" RelativeNamespace="" IsAbstract="false" IsUpdatable="true" EntityType="Entity" SourceObjectName="dbo.Product" SourceObjectType="Table" Visible="true">
				<Properties>
					<PropertyDefinition Name="ProductID" SourceObjectName="ProductID" Visible="true"/>
					<PropertyDefinition Name="ProductName" SourceObjectName="ProductName" Visible="true"/>
					<PropertyDefinition Name="Description" SourceObjectName="Description" Visible="true"/>
					<PropertyDefinition Name="Price" SourceObjectName="Price" Visible="true"/>
				</Properties>
				<BusinessKeys>
					<BusinessKeyDefinition SourceObjectName="ProductName" />
				</BusinessKeys>
				<Relationships>
					<RelationshipDefinition Name="OrderDetails" RelationshipType="OneToMany" SourceObjectName="FK_OrderDetail_Product" Visible="true"/>
				</Relationships>
			</EntityDefinition>
			<EntityDefinition Name="Status" RelativeNamespace="" IsAbstract="false" IsUpdatable="true" EntityType="Enum" SourceObjectName="dbo.Status" SourceObjectType="Table" Visible="true">
				<Properties>
					<PropertyDefinition Name="StatiID" SourceObjectName="StatiID" Visible="true"/>
					<PropertyDefinition Name="StatusName" SourceObjectName="StatusName" Visible="true"/>
				</Properties>
				<BusinessKeys>
					<BusinessKeyDefinition SourceObjectName="StatusName" />
				</BusinessKeys>
				<Relationships>
					<RelationshipDefinition Name="Orders" RelationshipType="OneToMany" SourceObjectName="FK_Order_Status" Visible="true"/>
				</Relationships>
			</EntityDefinition>
		</Entities>
	</DomainDefinition>
	<BusinessLayerDefinition>
		<RelativeDomainLayerNamespace>Business.Entities</RelativeDomainLayerNamespace>
		<RelativeServiceLayerNamespace>Business.Services</RelativeServiceLayerNamespace>
		<Features>
			<SupportWCF>true</SupportWCF>
			<TargetCLRVersion>3.0</TargetCLRVersion>
			<TargetDatabase>SQL2005</TargetDatabase>
		</Features>
		<MetaData>
			<Entity>
				<Filename>$Domain.Model.RootPath$\$Domain.Model.BusinessLayer.RelativeDomainLayerNamespace$\$RelativeNamespace#Replace('.','\')$\$Name$</Filename>
				<GeneratedFilename>$Domain.Model.RootPath$\$Domain.Model.BusinessLayer.RelativeDomainLayerNamespace$\Generated\$RelativeNamespace#Replace('.','\')$\$Name$</GeneratedFilename>
			</Entity>
			<Service>
				<Filename>$Model.RootPath$\$Model.BusinessLayer.RelativeServiceLayerNamespace$\$RelativeNamespace#Replace('.','\')$\$Name$</Filename>
				<GeneratedFilename>$Model.RootPath$\$Model.BusinessLayer.RelativeServiceLayerNamespace$\Generated\$RelativeNamespace#Replace('.','\')$\$Name$</GeneratedFilename>
				<InterfaceName>I$Name$</InterfaceName>
				<InterfaceFilename>$Model.RootPath$\$Model.BusinessLayer.RelativeServiceLayerNamespace$.Interfaces\$RelativeNamespace#Replace('.','\')$\I$Name$</InterfaceFilename>
				<InterfaceGeneratedFilename>$Model.RootPath$\$Model.BusinessLayer.RelativeServiceLayerNamespace$.Interfaces\Generated\$RelativeNamespace#Replace('.','\')$\I$Name$</InterfaceGeneratedFilename>
				<InterfaceRelativeNamespace>Business.Services.Interfaces.$RelativeNamespace$</InterfaceRelativeNamespace>
			</Service>
			<ServiceDomain>
				<Filename>$RootPath$\$BusinessLayer.RelativeServiceLayerNamespace$</Filename>
				<GeneratedFilename>$RootPath$\$BusinessLayer.RelativeServiceLayerNamespace$\Generated</GeneratedFilename>
			</ServiceDomain>
			<ServiceMethods>
				<!-- ServiceMethodTypes: Unknown, RetrieveSingle, RetrieveMultiple, RetrieveManyToMany, RetrieveHierarchy, StoreSingle, StoreMultiple, StoreManyToMany, DeleteSingle, DeleteMultiple -->
				<ServiceMethodMetaDataDefinition ServiceType="RetrieveSingle">
					<FunctionName>gfn_Retrieve$Name$</FunctionName>
					<StoredProcedureName>gsp_Retrieve$Name$</StoredProcedureName>
					<MethodName>Retrieve$Entity.Name$</MethodName>
					<Role></Role>
				</ServiceMethodMetaDataDefinition>
				<ServiceMethodMetaDataDefinition ServiceType="RetrieveMultiple">
					<FunctionName>gfn_$Name$Search</FunctionName>
					<StoredProcedureName>gsp_$Name$Search</StoredProcedureName>
					<MethodName>$Entity.Name$Search</MethodName>
					<Role></Role>
				</ServiceMethodMetaDataDefinition>
				<ServiceMethodMetaDataDefinition ServiceType="RetrieveManyToMany">
					<FunctionName>gfn_Retrieve$Parent.Name$$Name$</FunctionName>
					<StoredProcedureName>gsp_Retrieve$Name$</StoredProcedureName>
					<MethodName>Retrieve$Name$</MethodName>
					<Role></Role>
				</ServiceMethodMetaDataDefinition>
				<ServiceMethodMetaDataDefinition ServiceType="RetrieveHierarchy">
					<FunctionName>gfn_Retrieve$Name$</FunctionName>
					<StoredProcedureName>gsp_Retrieve$Name$</StoredProcedureName>
					<MethodName>Retrieve$Entity.Name$</MethodName>
					<Role></Role>
				</ServiceMethodMetaDataDefinition>
				<ServiceMethodMetaDataDefinition ServiceType="StoreSingle">
					<FunctionName></FunctionName>
					<StoredProcedureName>gsp_$Name$Store</StoredProcedureName>
					<MethodName>$Entity.Name$Store</MethodName>
					<Role></Role>
				</ServiceMethodMetaDataDefinition>
				<ServiceMethodMetaDataDefinition ServiceType="StoreMultiple">
					<FunctionName></FunctionName>
					<StoredProcedureName>gsp_$Name$sStore</StoredProcedureName>
					<MethodName>$Entity.Name$sStore</MethodName>
					<Role></Role>
				</ServiceMethodMetaDataDefinition>
				<ServiceMethodMetaDataDefinition ServiceType="StoreManyToMany">
					<FunctionName></FunctionName>
					<StoredProcedureName>gsp_$Parent.Name$$RelatedEntity.Name$Store</StoredProcedureName>
					<MethodName>$Parent.Name$$RelatedEntity.Name$Store</MethodName>
					<Role></Role>
				</ServiceMethodMetaDataDefinition>
				<ServiceMethodMetaDataDefinition ServiceType="StoreManyToManyMultiple">
					<FunctionName></FunctionName>
					<StoredProcedureName>gsp_$Parent.Name$$Name$Store</StoredProcedureName>
					<MethodName>$Parent.Name$$Name$Store</MethodName>
					<Role></Role>
				</ServiceMethodMetaDataDefinition>
				<ServiceMethodMetaDataDefinition ServiceType="DeleteSingle">
					<FunctionName></FunctionName>
					<StoredProcedureName>gsp_$Name$Delete</StoredProcedureName>
					<MethodName>$Entity.Name$Delete</MethodName>
					<Role></Role>
				</ServiceMethodMetaDataDefinition>
				<ServiceMethodMetaDataDefinition ServiceType="DeleteMultiple">
					<FunctionName>gfn_$Name$Delete</FunctionName>
					<StoredProcedureName>gsp_$Name$sDelete</StoredProcedureName>
					<MethodName>$Entity.Name$sDelete</MethodName>
					<Role></Role>
				</ServiceMethodMetaDataDefinition>
			</ServiceMethods>
		</MetaData>
		<BusinessServiceDefinitions>
			<BusinessServiceDefinition Name="Customer" RelativeNamespace="">
				<ExposedEntities>
					<ExposedEntityDefinition SourceObjectName="dbo.Customer" IncludeHardDelete="false" IncludeRelatedEntities="true" IncludeRetrieveSingle="true" IncludeRetrieveMultiple="true" IncludeSoftDelete="false" IncludeStore="true" />
				</ExposedEntities>
				<ServiceMethods />
			</BusinessServiceDefinition>
			<BusinessServiceDefinition Name="Order" RelativeNamespace="">
				<ExposedEntities>
					<ExposedEntityDefinition SourceObjectName="dbo.Order" IncludeHardDelete="false" IncludeRelatedEntities="true" IncludeRetrieveSingle="true" IncludeRetrieveMultiple="true" IncludeSoftDelete="false" IncludeStore="true" />
				</ExposedEntities>
				<ServiceMethods />
			</BusinessServiceDefinition>
			<BusinessServiceDefinition Name="OrderDetail" RelativeNamespace="">
				<ExposedEntities>
					<ExposedEntityDefinition SourceObjectName="dbo.OrderDetail" IncludeHardDelete="false" IncludeRelatedEntities="true" IncludeRetrieveSingle="true" IncludeRetrieveMultiple="true" IncludeSoftDelete="false" IncludeStore="true" />
				</ExposedEntities>
				<ServiceMethods />
			</BusinessServiceDefinition>
			<BusinessServiceDefinition Name="OrderType" RelativeNamespace="">
				<ExposedEntities>
					<ExposedEntityDefinition SourceObjectName="dbo.OrderType" IncludeHardDelete="false" IncludeRelatedEntities="true" IncludeRetrieveSingle="true" IncludeRetrieveMultiple="true" IncludeSoftDelete="false" IncludeStore="true" />
				</ExposedEntities>
				<ServiceMethods />
			</BusinessServiceDefinition>
			<BusinessServiceDefinition Name="Product" RelativeNamespace="">
				<ExposedEntities>
					<ExposedEntityDefinition SourceObjectName="dbo.Product" IncludeHardDelete="false" IncludeRelatedEntities="true" IncludeRetrieveSingle="true" IncludeRetrieveMultiple="true" IncludeSoftDelete="false" IncludeStore="true" />
				</ExposedEntities>
				<ServiceMethods />
			</BusinessServiceDefinition>
			<BusinessServiceDefinition Name="Status" RelativeNamespace="">
				<ExposedEntities>
					<ExposedEntityDefinition SourceObjectName="dbo.Status" IncludeHardDelete="false" IncludeRelatedEntities="true" IncludeRetrieveSingle="true" IncludeRetrieveMultiple="true" IncludeSoftDelete="false" IncludeStore="true" />
				</ExposedEntities>
				<ServiceMethods />
			</BusinessServiceDefinition>
			<BusinessServiceDefinition Name="NeedsSorting" RelativeNamespace="">
				<ExposedEntities>
				</ExposedEntities>
				<ServiceMethods />
			</BusinessServiceDefinition>
		</BusinessServiceDefinitions>
	</BusinessLayerDefinition>
</ModelDefinition>

